// pages/food/food.js
Page({
    data: {
      activeCategory: 0,
      categories: [
        { id: 0, name: '全部' },
        { id: 1, name: '米粉类' },
        { id: 2, name: '河鲜类' },
        { id: 3, name: '小吃类' },
        { id: 4, name: '甜品类' }
      ],
      banners: [
        {
          id: 1,
          image: '/images/food-banner1.jpg',
          title: '阳朔啤酒鱼·非遗美食'
        },
        {
          id: 2,
          image: '/images/food-banner2.jpg',
          title: '桂林米粉·百年老店'
        }
      ],
      foodList: [
        {
          id: 1,
          name: '大师傅啤酒鱼',
          cover: '/images/food1.jpg',
          rating: 4.8,
          price: 98,
          address: '阳朔西街3号',
          tags: ['非遗美食', '人气爆款', '西街必吃'],
          location: { lat: 24.778461, lng: 110.496593 }
        },
        {
          id: 2,
          name: '瘦子米粉',
          cover: '/images/food2.jpg',
          rating: 4.7,
          price: 15,
          address: '抗战路23号',
          tags: ['老字号', '本地推荐'],
          location: { lat: 24.781234, lng: 110.498765 }
        }
      ]
    },
  
    // 切换分类
    changeCategory(e) {
      const index = e.currentTarget.dataset.index
      this.setData({ activeCategory: index })
      // 此处应调用接口获取对应分类数据
    },
  

  
  
  })